package com.liujun.spring4.demo.aop.ioc.base.annotationbeans;

import com.liujun.spring4.demo.aop.ioc.base.beanFactory.Car;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.testng.Assert;
import org.testng.annotations.Test;

/**
 * 进行注解式bean配制的测试
 *
 * @author liujun
 * @version 1.0
 * @date 2018-08-12 08:35:00
 */
public class AnnotationApplicationContextTest {

  @Test
  public void getBean() {
    ApplicationContext ctx = new AnnotationConfigApplicationContext(Beans.class);
    Car car = ctx.getBean("car", Car.class);
    System.out.println(car);
    Assert.assertNotNull(car);
  }
}
